<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{
				/* 权值 0  很容易被覆盖 */
				color: #aaaaff !important;
				background: #aa00ff !important;
			}
			div{
				/* 权值1 */
				color: #0000ff;
				background: #55ffff;
			}
			.d1{
				/* 权值10 */
				color: #ff0000;
				background: #aaaaff;
			}
			div.d1{
				/* 选择器权值之和   权值 */
				color: #55007f;
				background: #aaff00;
			}
			body div .d1{
				/* 权值12 */
				font-size: 25px;
				color: #0000ff;
				background: #55ffff;
			}
			#d1{
				/* 权值100*/
				font-size: 15px;
				color: #ffaa00;
				background: #ff55ff;
			}
			div#d1:hover{
				/* 权值111 */
			color: #0000ff;
			background: #55ffff;
			}
		</style>
	</head>
	<body>
		<div class="d1"id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Suscipit commodi veritatis illo ad eligendi magnam totam tempora nobis aspernatur voluptates recusandae rem dolores culpa, cupiditate natus laboriosam dignissimos quam dicta?</div>
	</body>
</html>